

    {present name="article"}
    <!--编辑-->
    <div class="form-group">
        <label class="col-lg-2 control-label">所属分类<span class="text text-danger">*</span></label>
        <div class="col-lg-10">
            <select name="category_ids[]" tabindex="4" required="" placeholder="选择分类" class="form-control chosen-select form-control chosen-select-deselect chosen-select-no-single chosen-select-no-results chosen-select-search" multiple style="width:100%!important;" >
                {volist name="categoryList" id="cl"}
                <option value="{$cl.id}" {in name="cl.id" value="$oldCategoryIds"}selected{/in}>{$cl._name|raw}</option>
                {/volist}
            </select>
            <span class="help-block m-b-none"></span>
        </div>
    </div>
    {else/}
    <div class="form-group">
        <label class="col-lg-2 col-md-2 control-label">所属分类<span class="text text-danger">*</span></label>
        <div class="col-lg-10 col-md-10">
            <select data-placeholder="选择分类" tabindex="4" name="category_ids[]" class="form-control chosen-select form-control chosen-select-deselect chosen-select-no-single chosen-select-no-results chosen-select-search" multiple style="width:100%!important;">
                {volist name="categoryList" id="cl"}
                <option value="{$cl.id}">{$cl._name|raw}</option>
                {/volist}
            </select>
            <span class="help-block m-b-none"></span>
        </div>
    </div>
    {/present}

    <div class="form-group">
        <label class="col-lg-2 control-label" for="title">文章标题<span class="text text-danger">*</span></label>
        <div class="col-lg-10">
            <input class="form-control" type="text" id="title" name="title" placeholder="文章标题" value="{$article.title|default=''}" required>
            <span class="help-block m-b-none"></span>
        </div>
    </div>
    <div class="form-group">
        <label class="col-lg-2 control-label" for="author">文章作者</label>
        <div class="col-lg-10">
            <input class="form-control" type="text" id="author" name="author" placeholder="文章作者" value="{$article.author|default=$myself['nickname']}">
            <span class="help-block m-b-none"></span>
        </div>
    </div>
    <div class="form-group">
        <label class="col-lg-2 control-label" for="keywords">关键词</label>
        <div class="col-lg-10">
            <input class="form-control" type="text" id="keywords" name="keywords" placeholder="关键词" value="{$article.keywords|default=''}">
            <span class="help-block m-b-none">多个关键词以英文逗号(,)分隔</span>
        </div>
    </div>

    <div class="form-group">
        <label class="col-lg-2 control-label">摘要</label>
        <div class="col-lg-10">
            <textarea class="form-control" name="description">{$article.description|default=''}</textarea>
            <span class="help-block m-b-none"></span>
        </div>
    </div>

    <div class="form-group">
        <label class="col-lg-2 control-label" for="keywords">标签</label>
        <div class="col-lg-10">
            <input class="form-control" type="text" id="tags" name="tags" placeholder="添加标签" value="{$article ? implode(',',$article->metas('tag')) : ''}">
            <span class="help-block m-b-none"></span>
        </div>
    </div>

    <div class="form-group">
        <label class="col-lg-2 control-label">缩略图</label>
        <div class="col-lg-10">
            <input type="hidden" name="thumb_image_id" id="thumb_image_id" value="{$article.thumb_image_id|default=''}">
            {php}
            $themeConfig = get_theme_config();
            $articleThumbImage = $themeConfig['article_thumb_image'];
            {/php}
            <div class="dropzone needsclick dz-clickable" id="uploadThumbImage" data-input-name="thumb_image_id" data-width="{$articleThumbImage.width}" data-height="{$articleThumbImage.height}"
                 data-thumb-width="{$articleThumbImage.thumb_width}" data-thumb-height="{$articleThumbImage.thumb_height}">
                <div class="dz-message needsclick">
                    {if isset($article) && $article.thumb_image_id > 0}
                    <img src="{$article.thumb_image.full_image_url}" style="border:1px solid #ccc;{$articleThumbImage.thumb_width}px;height:{$articleThumbImage.thumb_height}px">
                    {else/}
                    点击此处上传文章缩略图 {$articleThumbImage.width}*{$articleThumbImage.height}<br>
                    <span class="note needsclick"></span>
                    {/if}
                </div>
            </div>
            <span class="help-block m-b-none">文章缩略图 {$articleThumbImage.width}*{$articleThumbImage.height}</span>
        </div>
    </div>

    <div class="form-group">
        <label class="col-lg-2 control-label">内容<span class="text text-danger">*</span></label>
        <div class="col-lg-10">
            <script id="container" name="content" type="text/plain">{$article ? html_entity_decode($article['content']) : ''}</script>
        </div>

        {present name="article"}
        <input type="hidden" name="id" value="{$article.id}">
        <input type="hidden" name="oldCategoryIds" value="{$oldCategoryIds|json_encode}">
        <input type="hidden" name="status" value="{$article.status}" />
        {else/}
        <input type="hidden" name="status" value="{:\\app\\common\\model\\ArticleModel::STATUS_DRAFT}" />
        {/present}
    </div>

